#include "taskrequestsignalspy.h"

namespace Wishmaster {
TaskRequestSignalSpy::TaskRequestSignalSpy(QObject *parent) :
	QObject(parent), m_taskBoardRequestCalls(0),
	m_taskThreadRequestCalls(0),
	m_taskAttachmentRequestCalls(0)
{
}

void TaskRequestSignalSpy::emitSignalResult(const RequestPtr& rq, const QByteArray& arr)
{
	emit signal_result(rq, arr);
}

void TaskRequestSignalSpy::result(TaskBoardRequest* /*task*/, const QByteArray& /*arr*/,
								  const QString& /*contentType*/)
{
	m_taskBoardRequestCalls++;
}

void TaskRequestSignalSpy::result(TaskThreadRequest* /*task*/, const QByteArray& /*arr*/,
								  const QString& /*contentType*/)
{
	m_taskThreadRequestCalls++;
}

void TaskRequestSignalSpy::result(TaskAttachmentRequest* /*task*/, const QByteArray& /*arr*/,
								  const QString& /*contentType*/)
{
	m_taskAttachmentRequestCalls++;
}

int TaskRequestSignalSpy::taskBoardRequestCalls() const
{
	return m_taskBoardRequestCalls;
}

int TaskRequestSignalSpy::taskThreadRequestCalls() const
{
	return m_taskThreadRequestCalls;
}

int TaskRequestSignalSpy::taskAttachmentRequestCalls() const
{
	return m_taskAttachmentRequestCalls;
}

}
